<!-- This page is for adoption preference.-->

<?php 
$page_title="Adoption Preference";
require_once('../auth/auth.php');
$page_title= $_SESSION['SESS_USER_TITLE'] . " " . $_SESSION['SESS_USER_LAST_NAME'] . "'s Adoption Preference";
include('templates/header.php'); 

// Accesses database                                    
 include 'db/db_Connect.php';
 	$user_id = $_SESSION['SESS_USER_ID'];
 	$result = mysql_query("SELECT * from AdoptionPreferences WHERE user_id = '$user_id'");
	$preference = mysql_fetch_array($result);

 include 'db/db_Close.php';    
?>
			<div class="row-fluid sortable">
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<h2><i class="icon-user"></i> Adoption Preference</h2>
						<div class="box-icon">
							<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
							<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
						</div>
					</div>
					<div class="box-content">
					
						<form class="form-horizontal" name="updatePreferences" action="db/updatePreferenceInformationDB.php" method="post">
							<fieldset>
											
						<!-- # of adults-->							
							  <div class="control-group">
									<label class="control-label" for="focusedInput">Number of Adults</label>
								<div class="controls">
								  <input name="num_adults" class="input-xlarge focused" id="focusedInput" type="text" value="<?php echo $preference['num_adults']; ?>">
								</div>
							  </div>
						<!-- # of children-->
							  	<div class="control-group">
									<label class="control-label" for="focusedInput">Number of Children</label>
								<div class="controls">
								  <input name="num_children" class="input-xlarge focused" id="focusedInput" type="text" value="<?php echo $preference['num_children']; ?>">
								</div>
							  </div>
						<!-- Provide toys?-->				
							  <div class="control-group">
								<label class="control-label">Provide Toys?</label>
								<div class="controls">
								  <label class="radio">
									<input name="toyOK" type="radio" id="toyradio1" value="1" <?php if($preference['toyOK'] == '1'){ echo "checked=''";} ?> >
										Yes
								  </label>
								  <div style="clear:both"></div>
								  <label class="radio">
									<input type="radio" name="toyOK" id="toyradio2" value="0" <?php if($preference['toyOK'] == '0'){ echo "checked=''";} ?> >
										No
								  </label>
								</div>
							  </div>
						<!-- Provide delivery?-->				
							  <div class="control-group">
								<label class="control-label">Provide Delivery?</label>
								<div class="controls">
								  <label class="radio">
									<input name="deliveryOK" type="radio" id="deliveryradio1" value="1" <?php if($preference['deliveryOK'] == '1'){ echo "checked=''";} ?> >
										Yes
								  </label>
								  <div style="clear:both"></div>
								  <label class="radio">
									<input type="radio" name="deliveryOK" id="deliveryradio2" value="0" <?php if($preference['deliveryOK'] == '0'){ echo "checked=''";} ?> >
										No
								  </label>
								</div>
							  </div>
						<!-- Spanish?-->				
							  <div class="control-group">
								<label class="control-label">Spanish Speaker?</label>
								<div class="controls">
								  <label class="radio">
									<input name="spanishOK" type="radio" id="spanishradio1" value="1" <?php if($preference['spanishOK'] == '1'){ echo "checked=''";} ?> >
										Yes
								  </label>
								  <div style="clear:both"></div>
								  <label class="radio">
									<input type="radio" name="spanishOK" id="spanishradio2" value="0" <?php if($preference['spanishOK'] == '0'){ echo "checked=''";} ?> >
										No
								  </label>
								</div>
							  </div>
						<!-- Other-->							
							  <div class="control-group">
									<label class="control-label" for="focusedInput">Other</label>
								<div class="controls">
								  <input name="other" class="input-xlarge focused" id="focusedInput" type="text" value="<?php echo $preference['other']; ?>">
								</div>
							  </div>
							  
							  <div class="form-actions">
								<button type="submit" class="btn btn-primary">Save changes</button>
								<button class="btn" type="reset">Cancel</button>
							  </div>
							</fieldset>
						  </form>
					
					</div>
				</div><!--/span-->
			
			</div><!--/row-->
    
<?php include('templates/footer.php'); ?>
